#!/bin/sh
# usage : ./run.sh NP

date=$(date '+%Y-%m-%d %H:%M')
N=$1
filename="runLog_"$(date '+%Y_%m_%d_%H:%M')_n$N

dir1="kvlcc2"
dir2="suboff"
prefix1=""
prefix2="suboff"

echo -e "$dir1\n"|tee -a $filename;
# kvlcc2
## u
echo -e "\nu\n"|tee -a $filename;
mpirun -np $N ./main ../$dir1/ u|tee -a $filename;
## v
echo -e "\nv\n"|tee -a $filename;
mpirun -np $N ./main ../$dir1/ v|tee -a $filename;
## w
echo -e "\nw\n"|tee -a $filename;
mpirun -np $N ./main ../$dir1/ w|tee -a $filename;

echo -e "\n$dir2\n"|tee -a $filename;
# suboff
## u
echo -e "\nu\n"|tee -a $filename;
mpirun -np $N ./main ../$dir2/ u $prefix2|tee -a $filename;
## v
echo -e "\nv\n"|tee -a $filename;
mpirun -np $N ./main ../$dir2/ v $prefix2|tee -a $filename;
## w
echo -e "\nw\n"|tee -a $filename;
mpirun -np $N ./main ../$dir2/ w $prefix2|tee -a $filename;
